<template>
  <el-row class="tac">
    <el-col :span="12">
      <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="2"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose"
        :router="true"
      >
        <el-menu-item index="/">
          <el-icon><setting /></el-icon>
          <span>首页</span>
        </el-menu-item>
        <el-sub-menu index="1">
          <template #title>
            <el-icon></el-icon>
            <span>系统管理</span>
          </template>
          <el-menu-item index="system">系统账号</el-menu-item>
          <el-menu-item index="role">角色列表</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="2">
          <template #title>
            <el-icon></el-icon>
            <span>广告管理</span>
          </template>
          <el-menu-item index="notice">广告列表</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="3">
          <template #title>
            <el-icon></el-icon>
            <span>套装管理</span>
          </template>
          <el-menu-item index="suitcategory">套装分类</el-menu-item>
          <el-menu-item index="suit">套装商品</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="4">
          <template #title>
            <el-icon></el-icon>
            <span>商品管理</span>
          </template>
          <el-menu-item index="shopcategory">商品分类</el-menu-item>
          <el-menu-item index="shoplist">商品列表</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="5">
          <template #title>
            <el-icon></el-icon>
            <span>订单管理</span>
          </template>
          <el-menu-item index="cardlist">订单列表</el-menu-item>
          <el-menu-item index="return">退货订单</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="6">
          <template #title>
            <el-icon></el-icon>
            <span>用户管理</span>
          </template>
          <el-menu-item index="list">用户列表</el-menu-item>
        </el-sub-menu>
  
      </el-menu>
    </el-col>
  </el-row>
</template>

<script setup lang="ts">
import { ref, reactive, toRefs, onMounted } from "vue";

const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
</script>
<style scoped lang="less">
.el-menu {
  width: 200px;
  height: 100vh;
}
</style>